#include "StdAfx.h"
#include "zoar.h"
#include "btime.h"		//for port info
#include "machine/ZoarMachine.h"

static dip_t dip1[] =
	{
	{"Coin 1",2,3,{{"2 coins/1 credit",0},{"1 coin/3 credits",1},{"1 coin/2 credits",2},{"1 coin/1 credit",3}}},
	{"Coin 2",2,0xC,{{"2 coins/1 credit",0},{"1 coin/3 credits",4},{"1 coin/2 credits",8},{"1 coin/1 credit",0xC}}},
	{"Unknown",1,0,{{"off",0},{"on",0x10}}},
	{"Service",1,0x20,{{"on",0},{"off",0x20}}},
	{"Cabinet type",1,0,{{"upright",0},{"cocktail",0x40}}},
	{"VBlank",-1,0,{{"off",0},{"on",0x80}}},
	{0,0,0,0,0}	
	};

static dip_t dip2[] =
	{
	{"Lives",1,1,{{"5",0},{"3",1}}},
	{"Bonus life",2,6,{{"20,000",0},{"15,000",2},{"10,000",4},{"5,000",6}}},
	{"Difficulty",1,8,{{"hard",0},{"easy",8}}},
	{"Weapon select",1,0x10,{{"manual",0},{"automatic",0x10}}},
	{"Unknown",1,0,{{"off",0},{"on",0x20}}},
	{"Unknown",1,0,{{"off",0},{"on",0x40}}},
	{"Unknown",1,0,{{"off",0},{"on",0x80}}},
	{0,0,0,0,0}	
	};

static highscore_t highscore[] =
	{
	{0x02DD,3},
	{0x02E5,0xF},
	{0x034B,3},
	{0x0356,3},
	{0x0361,3},
	{0x036C,3},
	{0x0377,3},
	{0,-1}
	};

Czoar::Czoar()
{
SetName("zoar");							//set romset name
SetScreen(256,256,ROTATE_270);
SetHighScoreInfo(highscore);
SetDip(0,dip1);
SetDip(1,dip2);
SetPort(0,&btimePort1);
SetPort(1,&btimePort2);
SetPort(2,&btimePort3);
AddROM("zoar15",0xD000,0x1000,0x1f0cfdb7,ROM_CPU1);
AddROM("zoar16",0xE000,0x1000,0x7685999c,ROM_CPU1);
AddROM("zoar17",0xF000,0x1000,0x619ea867,ROM_CPU1);
AddROM("zoar09",0xF000,0x1000,0x18d96ff1,ROM_CPU2);
AddROM("zoar00",0x0000,0x1000,0xfd2dcb64,ROM_VROM1);
AddROM("zoar01",0x1000,0x1000,0x74d3ca48,ROM_VROM1);
AddROM("zoar03",0x2000,0x1000,0x77b7df14,ROM_VROM1);
AddROM("zoar04",0x3000,0x1000,0x9be786de,ROM_VROM1);
AddROM("zoar06",0x4000,0x1000,0x07638c71,ROM_VROM1);
AddROM("zoar07",0x5000,0x1000,0xf4710f25,ROM_VROM1);
AddROM("zoar10",0x0000,0x0800,0xaa8bcab8,ROM_VROM2);
AddROM("zoar11",0x0800,0x0800,0xdcdad357,ROM_VROM2);
AddROM("zoar12",0x1000,0x0800,0xed317e40,ROM_VROM2);
AddROM("zoar13",0x0000,0x1000,0x8fefa960,ROM_VROM3);
AddROM("zoar02",0x0000,0x1000,0xd8c3c122,ROM_VROM4);
AddROM("zoar05",0x1000,0x1000,0x05dc6b09,ROM_VROM4);
AddROM("zoar08",0x2000,0x1000,0x9a148551,ROM_VROM4);
AddROM("z20-1l",0x0000,0x0020,0xa63f0a07,ROM_PROM);
AddROM("z21-1l",0x0020,0x0020,0x5e1e5788,ROM_PROM);
}

CMachine *Czoar::CreateMachine()
{
return(new CZoarMachine());
}
